package pt.um.jspecput.util;

import org.databene.benerator.anno.InvocationCount;
import org.databene.benerator.anno.Unique;
import org.databene.feed4junit.Feeder;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;

@RunWith(Feeder.class)
public class NoExitSecurityManagerTest {

    private NoExitSecurityManager nesm;

    @Before
    public void setUp() throws Exception {
        nesm = new NoExitSecurityManager();
    }

    @After
    public void tearDown() throws Exception {
        nesm = null;
    }

    @Test(expected = ExitException.class)
    @Unique
    @InvocationCount(10)
    public void testCheckExit(int status) {
        nesm.checkExit(status);
    }
}
